import request from '@/router/axios';
import {
  fenExYuangettoFixed, getAppealTypes, getIs_sup_payment,
  getLineName, getMappingStatus,
  getNoticeStates,
  getStationName, is_sup_payment,
  allStatus, getMappingStatusArray
} from "../../../../subwayRat/commonCheck";
import store from '@/store';
/**
 * 列表
 * @param query
 */
export function getSwAuConductorShortList(query) {
  return request({
    url: '/check/checkNew/getSwAuConductorShortList',
    method: 'post',
    params: query,
    data:query,
  })
}

/**
 * 补款
 * @param query
 */
export function buKuanSwAuConductorShort(query) {
  return request({
    url: '/check/checkNew/buKuanSwAuConductorShort',
    method: 'post',
    params: query,
    data:query,
  })
}


/**
 * 批量补款
 * @param query
 */
export function batchBuKuanSwAuConductorShort(query) {
  return request({
    url: '/check/checkNew/batchBuKuanSwAuConductorShort',
    method: 'post',
    params: query,
    // data:query,
  })
}

/**
 * 确认
 * @param query
 */
export function querenSwAuConductorShort(query) {
  return request({
    url: '/check/checkNew/querenSwAuConductorShort',
    method: 'post',
    params: query,
    data:query,
  })
}

export const shouPiaoYuanBKQRTZ_zhanNeiRYDLCK_option = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  viewBtn: false,
  editBtn: false,
  emptyBtn:false,
  delBtn: false,
  align: 'center',
  selection: true,
  reserveSelection:false,
  addBtn: false,
  height: 450,
  column: [
    /*{
    fixed: true,
    label: '主键',
    prop: 'id',
    span: 24,
    hide: true
  }, {
    hide: false,
    label: '线路名称',
    prop: 'lineCode',
    type: 'select',
    search: false,
    cascaderItem: ["stationCode"],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/check/check/getLineLists?userCode="+ store.getters.userInfo.userCode,
    display: true // 动态显隐控制不能删除
  }, {
    hide: false,
    label: '站点名称',
    prop: 'stationCode',
    type: 'select',
    search: false,
    dicFlag: false,
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/check/check/getStationLists?userCode="+ store.getters.userInfo.userCode + "&lineCode={{key}}",
    display: true// 动态显隐控制不能删除
  },*/
    // {
    //   label: '审核主表ID',
    //   prop: 'diffId',
    //   hide: true,
    //   search: false
    // },
    {
      label: '收入日期',
      prop: 'checkTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      width:160,
      // formslot:true,
      cell: true,
      type: 'date',
      hide: false,
      search: true
    },{
      hide: false,
      label: '补款日期',
      prop: 'supPaymentTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      type:'date',
	  width:160,
      search: true
    }, {
      hide: true,
      label: '补款期限',
      prop: 'supPaymentTimelimit',
      search: false
    }, {
    label: '补款金额',
    prop: 'shortAmount',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    search: false,
    hide: false,
    type:'input',
  }, {
    label: '补款人',
    prop: 'conductorPerson',
    search: true,
    searchslot: true,
    hide: false,
  }, {
    label: '补款人员工号',
    prop: 'conductorPersonCode',
    search: false,
    hide: false,
  }, {
    label: '是否补款',
    prop: 'isSupPayment',
      dicData:[{label:'未补款',value:0},{label:'已补款',value:1}],
    formatter:function(row, value , label, column){
      return value == 0?'未补款':'已补款';
    },
    type: 'select',
    search: true
  },{
      label: '是否确认',
      prop: 'confirmStatus',
      search: false,
      type:'select',
      dicData:getMappingStatusArray('extra_money_confirm'),
      formatter:function(row, value , label, column){
        return getMappingStatus('extra_money_confirm',value);
      },
      hide: true,
    },]
}




export const shouPiaoYuanBKQRTZ_zhanNeiRYDLCK_batchbukuan_option = {
  border: true,
  index: true,
  indexLabel: '序号',
  header:false,
  stripe: false,
  menu:false,
  menuAlign: 'center',
  viewBtn: false,
  editBtn: false,
  emptyBtn:false,
  delBtn: false,
  align: 'center',
  selection: false,
  reserveSelection:false,
  addBtn: false,
  column: [{
      label: '收入日期',
      prop: 'checkTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      width:160,
      type: 'date',
      hide: false,
    },{
      hide: false,
      label: '补款日期',
      prop: 'supPaymentTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      type:'date',
      slot: true
    }, {
      label: '补款金额',
      prop: 'shortAmount',
      type:'input',
      slot: true
    }, {
      label: '补款人',
      prop: 'conductorPerson',
      hide: false,
    }, {
      label: '补款人员工号',
      prop: 'conductorPersonCode',
      hide: false,
    }]
}



